﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category8
{
  public class MT802 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagChoiceDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagChoiceDefinition U0018;
    private static SwiftTagDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;
    private static SwiftTagDefinition U001F;
    private static SwiftTagSubItemDefinition U007F;
    private static SwiftTagSubItemDefinition U0080;
    private static SwiftTagChoiceDefinition U0081;
    private static SwiftTagDefinition U0082;
    private static SwiftTagSubItemDefinition U0083;
    private static SwiftTagSubItemDefinition U0084;
    private static SwiftTagDefinition U0086;
    private static SwiftTagSubItemDefinition U0087;
    private static SwiftTagSubItemDefinition U0088;
    private static SwiftTagDefinition U0089;
    private static SwiftTagSubItemDefinition U008A;
    private static SwiftTagSubItemDefinition U008B;
    private static SwiftTagDefinition U008C;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Settlement Number/Page Number")]
    public Tag28 SettlementNumberPageNumber_28
    {
      get
      {
        return new Tag28((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0004);
      }
    }

    [Description("Settlement Number/Page Number")]
    public Tag28 Tag28_SettlementNumberPageNumber
    {
      get
      {
        return this.SettlementNumberPageNumber_28;
      }
    }

    [Description("Settlement Amount")]
    public Tag32A SettlementAmount_32A
    {
      get
      {
        return new Tag32A((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0008);
      }
    }

    [Description("Settlement Amount")]
    public Tag32A Tag32A_SettlementAmount
    {
      get
      {
        return this.SettlementAmount_32A;
      }
    }

    [Description("Remitting Agent")]
    public Tag52A RemittingAgent_52A
    {
      get
      {
        return new Tag52A((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0012);
      }
    }

    [Description("Remitting Agent")]
    public Tag52A Tag52A_RemittingAgent
    {
      get
      {
        return this.RemittingAgent_52A;
      }
    }

    [Description("Remitting Agent")]
    public Tag52D RemittingAgent_52D
    {
      get
      {
        return new Tag52D((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0015);
      }
    }

    [Description("Remitting Agent")]
    public Tag52D Tag52D_RemittingAgent
    {
      get
      {
        return this.RemittingAgent_52D;
      }
    }

    [Description("Sender's Correspondent")]
    public Tag53A SendersCorrespondent_53A
    {
      get
      {
        return new Tag53A((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0019);
      }
    }

    [Description("Sender's Correspondent")]
    public Tag53A Tag53A_SendersCorrespondent
    {
      get
      {
        return this.SendersCorrespondent_53A;
      }
    }

    [Description("Sender's Correspondent")]
    public Tag53B SendersCorrespondent_53B
    {
      get
      {
        return new Tag53B((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U001C);
      }
    }

    [Description("Sender's Correspondent")]
    public Tag53B Tag53B_SendersCorrespondent
    {
      get
      {
        return this.SendersCorrespondent_53B;
      }
    }

    [Description("Sender's Correspondent")]
    public Tag53D SendersCorrespondent_53D
    {
      get
      {
        return new Tag53D((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U001F);
      }
    }

    [Description("Sender's Correspondent")]
    public Tag53D Tag53D_SendersCorrespondent
    {
      get
      {
        return this.SendersCorrespondent_53D;
      }
    }

    [Description("Receiver's Correspondent")]
    public Tag54A ReceiversCorrespondent_54A
    {
      get
      {
        return new Tag54A((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0082);
      }
    }

    [Description("Receiver's Correspondent")]
    public Tag54A Tag54A_ReceiversCorrespondent
    {
      get
      {
        return this.ReceiversCorrespondent_54A;
      }
    }

    [Description("Receiver's Correspondent")]
    public Tag54B ReceiversCorrespondent_54B
    {
      get
      {
        return new Tag54B((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0086);
      }
    }

    [Description("Receiver's Correspondent")]
    public Tag54B Tag54B_ReceiversCorrespondent
    {
      get
      {
        return this.ReceiversCorrespondent_54B;
      }
    }

    [Description("Receiver's Correspondent")]
    public Tag54D ReceiversCorrespondent_54D
    {
      get
      {
        return new Tag54D((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U0089);
      }
    }

    [Description("Receiver's Correspondent")]
    public Tag54D Tag54D_ReceiversCorrespondent
    {
      get
      {
        return this.ReceiversCorrespondent_54D;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT802.U008C);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT802()
      : base(true)
    {
    }

    public MT802(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT802.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT802.MessageDefinition = new SwiftMessageDefinition("MT802", "Settlement Advice");
      MT802.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT802.U0002.TagName = ":20:";
      MT802.U0003 = new SwiftTagSubItemDefinition("Reference", "Transaction Reference Number");
      MT802.U0002.Elements.Add((SwiftDefinitionElement) MT802.U0003);
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U0002);
      MT802.U0004 = new SwiftTagDefinition("SettlementNumberPageNumber_28", "Settlement Number/Page Number");
      MT802.U0004.TagName = ":28:";
      MT802.U0005 = new SwiftTagSubItemDefinition("SettlementNumber", "SettlementNumber");
      MT802.U0004.Elements.Add((SwiftDefinitionElement) MT802.U0005);
      MT802.U0006 = new SwiftTagSubItemDefinition("PageNumber", "Page Number");
      MT802.U0006.Mandatory = false;
      MT802.U0007 = new SwiftTagSubItemDefinition("PageNumber_1", "Page Number");
      MT802.U0006.Elements.Add((SwiftDefinitionElement) MT802.U0007);
      MT802.U0004.Elements.Add((SwiftDefinitionElement) MT802.U0006);
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U0004);
      MT802.U0008 = new SwiftTagDefinition("SettlementAmount_32A", "Settlement Amount");
      MT802.U0008.TagName = ":32A:";
      MT802.U000E = new SwiftTagSubItemDefinition("Date", "Date");
      MT802.U0008.Elements.Add((SwiftDefinitionElement) MT802.U000E);
      MT802.U000F = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT802.U0008.Elements.Add((SwiftDefinitionElement) MT802.U000F);
      MT802.U0010 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT802.U0008.Elements.Add((SwiftDefinitionElement) MT802.U0010);
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U0008);
      MT802.U0011 = new SwiftTagChoiceDefinition("Choice", "");
      MT802.U0011.Mandatory = false;
      MT802.U0011.Multiple = true;
      MT802.U0012 = new SwiftTagDefinition("RemittingAgent_52A", "Remitting Agent");
      MT802.U0012.TagName = ":52A:";
      MT802.U0013 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U0013.Mandatory = false;
      MT802.U0012.Elements.Add((SwiftDefinitionElement) MT802.U0013);
      MT802.U0014 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT802.U0012.Elements.Add((SwiftDefinitionElement) MT802.U0014);
      MT802.U0011.Elements.Add((SwiftDefinitionElement) MT802.U0012);
      MT802.U0015 = new SwiftTagDefinition("RemittingAgent_52D", "Remitting Agent");
      MT802.U0015.TagName = ":52D:";
      MT802.U0016 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U0016.Mandatory = false;
      MT802.U0015.Elements.Add((SwiftDefinitionElement) MT802.U0016);
      MT802.U0017 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT802.U0015.Elements.Add((SwiftDefinitionElement) MT802.U0017);
      MT802.U0011.Elements.Add((SwiftDefinitionElement) MT802.U0015);
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U0011);
      MT802.U0018 = new SwiftTagChoiceDefinition("Choice", "");
      MT802.U0018.Mandatory = false;
      MT802.U0018.Multiple = true;
      MT802.U0019 = new SwiftTagDefinition("SendersCorrespondent_53A", "Sender's Correspondent");
      MT802.U0019.TagName = ":53A:";
      MT802.U001A = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U001A.Mandatory = false;
      MT802.U0019.Elements.Add((SwiftDefinitionElement) MT802.U001A);
      MT802.U001B = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT802.U0019.Elements.Add((SwiftDefinitionElement) MT802.U001B);
      MT802.U0018.Elements.Add((SwiftDefinitionElement) MT802.U0019);
      MT802.U001C = new SwiftTagDefinition("SendersCorrespondent_53B", "Sender's Correspondent");
      MT802.U001C.TagName = ":53B:";
      MT802.U001D = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U001D.Mandatory = false;
      MT802.U001C.Elements.Add((SwiftDefinitionElement) MT802.U001D);
      MT802.U001E = new SwiftTagSubItemDefinition("Location", "Location");
      MT802.U001E.Mandatory = false;
      MT802.U001C.Elements.Add((SwiftDefinitionElement) MT802.U001E);
      MT802.U0018.Elements.Add((SwiftDefinitionElement) MT802.U001C);
      MT802.U001F = new SwiftTagDefinition("SendersCorrespondent_53D", "Sender's Correspondent");
      MT802.U001F.TagName = ":53D:";
      MT802.U007F = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U007F.Mandatory = false;
      MT802.U001F.Elements.Add((SwiftDefinitionElement) MT802.U007F);
      MT802.U0080 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT802.U001F.Elements.Add((SwiftDefinitionElement) MT802.U0080);
      MT802.U0018.Elements.Add((SwiftDefinitionElement) MT802.U001F);
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U0018);
      MT802.U0081 = new SwiftTagChoiceDefinition("Choice", "");
      MT802.U0081.Mandatory = false;
      MT802.U0081.Multiple = true;
      MT802.U0082 = new SwiftTagDefinition("ReceiversCorrespondent_54A", "Receiver's Correspondent");
      MT802.U0082.TagName = ":54A:";
      MT802.U0083 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U0083.Mandatory = false;
      MT802.U0082.Elements.Add((SwiftDefinitionElement) MT802.U0083);
      MT802.U0084 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT802.U0082.Elements.Add((SwiftDefinitionElement) MT802.U0084);
      MT802.U0081.Elements.Add((SwiftDefinitionElement) MT802.U0082);
      MT802.U0086 = new SwiftTagDefinition("ReceiversCorrespondent_54B", "Receiver's Correspondent");
      MT802.U0086.TagName = ":54B:";
      MT802.U0087 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U0087.Mandatory = false;
      MT802.U0086.Elements.Add((SwiftDefinitionElement) MT802.U0087);
      MT802.U0088 = new SwiftTagSubItemDefinition("Location", "Location");
      MT802.U0088.Mandatory = false;
      MT802.U0086.Elements.Add((SwiftDefinitionElement) MT802.U0088);
      MT802.U0081.Elements.Add((SwiftDefinitionElement) MT802.U0086);
      MT802.U0089 = new SwiftTagDefinition("ReceiversCorrespondent_54D", "Receiver's Correspondent");
      MT802.U0089.TagName = ":54D:";
      MT802.U008A = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT802.U008A.Mandatory = false;
      MT802.U0089.Elements.Add((SwiftDefinitionElement) MT802.U008A);
      MT802.U008B = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT802.U0089.Elements.Add((SwiftDefinitionElement) MT802.U008B);
      MT802.U0081.Elements.Add((SwiftDefinitionElement) MT802.U0089);
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U0081);
      MT802.U008C = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT802.U008C.TagName = ":72:";
      MT802.U008C.Mandatory = false;
      MT802.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT802.U008C);
    }
  }
}
